package com.leetcode.No1812;

import org.junit.Test;

/**
 * @program: Solution
 * @description: 判断国际象棋棋盘中一个格子的颜色
 *      时间 0ms 击败100%
 *      内存 38.8MB 击败99.13%
 * @author: Wang Zhihua
 * @date: 2022-12-08
 */
public class Solution {
    public boolean squareIsWhite(String coordinates) {
        return ((coordinates.charAt(0) ^ coordinates.charAt(1)) & 1) == 1;
    }

    @Test
    public void test01() {
        System.out.println(squareIsWhite("a1"));
    }
}
